<?php
require_once ("include.php");
require_once ("registereduserobj.php");
if ($userid = authenticate(false)) {
 header("Location: http://liftmate.com/getlift.php");
 exit();
} else {
 // The splash page
 echo notloggedon();
}


function notloggedon() {
 // Splash page
$rand = time();
 $o = <<< STARTTAG
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&libraries=places"></script>
<meta name="viewport" content="initial-scale=1, maximum-scale=5">

</head>
<body>
 <div data-role="header">
 <h1>Welcome to liftmate</h1>
 </div>

<form name=form method=POST data-ajax=false>
<input type=hidden name=rand value=$rand>
<table class='logon'>
<tr><td>Email address</td><td><input type=text name=userid value='antonylawler@gmail.com'></td></tr>
<tr><td>Password</td><td><input type=password name=password value=lexlawler></td></tr>
<tr><td><input type=checkbox name=cookie></td><td>Remember Me</td>
<tr><td><input type=submit value='Sign In'></td></tr>
<tr><td><a href=forgotpassword.php>Click here if you forgot your password</a></td></tr>
<tr><td><a href=newaccount.php>Sign Me Up</a></td></tr>
</table>
</form>
</body>
</html>
STARTTAG;
 return $o;
}

?>

